﻿using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using UnitLibrary.Managers;
using FarseerGames.FarseerPhysics;
using Microsoft.Xna.Framework.Content;
using UnitLibrary.GameObjects.Units;

namespace UnitLibrary.GameObjects
{
    public delegate void OnRemoval(Iid id);

    public interface IGameObject
    {
        /// <summary>
        /// Function that will have the object do a deep copy of the existing Instance into itself
        /// </summary>
        /// <param name="existingInstance">An existing instance to copy values from</param>
        void Create(object existingInstance, ComponentM components, Vector2 startLocation, Vector2 direction, bool addToPhysics);

        /// <summary>
        /// Used for reading in content via the content pipeline
        /// </summary>
        /// <param name="input"></param>
        void ReadContent(ContentReader input);

        /// <summary>
        /// Update itself
        /// </summary>
        /// <param name="gameTime">gametime</param>
        void Update(GameTime gameTime);

        /// <summary>
        /// Will draw itself onto the screen
        /// </summary>
        /// <param name="spritebatch">spritebatch it will use</param>
        void Draw(SpriteBatch spritebatch);

        /// <summary>
        /// Object will remove itself from anything it belongs to
        /// </summary>
        void Remove(bool RemoveRefFromPhysics);

        Iid ID
        { get; set; }

        /// <summary>
        /// Function to return the current position of the object in the game world
        /// </summary>
        /// <returns>Current location/position</returns>
        Vector2 Position
        { get; set; }
    }
}
